<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>layer弹出层组件</title>
  <script src="js/jquery2.1.4.js"></script>
  <script src="layer/layer.js"></script>
  <script>
    function msgTest(){
      layer.msg("提示的文字",function (){
         //窗口关闭时执行

      });
    }
    function loadTest(){
      //返回弹出层的id
      var windowId = layer.load(5) //0-16的数字

      //通过窗口的id，关闭窗口
      setTimeout(function (){
        layer.close(windowId);
      },2000);

    }
    function msg_loadTest(){
      layer.msg("提示的文字",{icon:0,shade:0.01});
    }

    function alertTest(){
      layer.alert("文字内容",{icon: 1});
    }

    function tipsTest(){
      layer.tips("这里有秘密","#s1",{tipsMore:true,tips:1});
    }
  </script>
</head>
<body>
  <button onclick="msgTest()">Msg函数（重点）</button><br>
  <button onclick="loadTest()">load函数（重点）</button><br>
  <button onclick="msg_loadTest()">Msg(load)效果</button><br>
  <button onclick="alertTest()">alert函数</button><br>
  <button onclick="tipsTest()">tips函数</button><br><br>
<p>
        锄禾日<span id="s1">当午</span>
</p>
</body>
</html>